import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import PlayArea from '../components/common/playarea/PlayArea'
import HomeVideo from '../views/homevideo/HomeVideo'
import Teleplay from '../views/teleplay/Teleplay'
import Variety from '../views/variety/Variety'
import Cartoon from '../views/cartoon/Cartoon'
import Childes from '../views/childes/Childes'
import Documentary from '../views/documentary/Documentary'
import Enter from '../components/common/enter/Enter'
import LogIn from '../components/common/enter/LogIn'
import Register from '../components/common/enter/Register'
import CarShow from '../components/common/middleareatwo/CarShow'
import CarShow1 from '../components/common/middleareatwo/CarShow1'
import LatestMovies from '../components/content/latestmovies/LatestMovies'
Vue.use(VueRouter)

const routes = [
  {
   path:'/',
   redirect:'home'
  },
  {
    path:'/home',
    component:Home,
    children:[
      {
        path:'/',
        redirect:'carshow'
      },
      {
        path:'carshow',
        component:CarShow
      },
      {
        path:'carshow1',
        component:CarShow1
      },
    ]
  },
  {
    path:'/enter',
    component:Enter,
    children:[
      {
        path:'/',
        redirect:'login'
      },
      {
        path:'login',
        component:LogIn
      },
      {
        path:'register',
        component:Register
      },
    ]
  },
  {
    path:'/homevideo',
    component:HomeVideo 
  },
  {
    path:'/teleplay',
    component:Teleplay
  },
  {
    path:'/playarea',
    component:PlayArea
  },
  {
    path:'/variety',
    component:Variety
  },
  {
    path:'/cartoon',
    component:Cartoon
  },
  {
    path:'/childes',
    component:Childes
  },
  {
    path:'/documentary',
    component:Documentary
  },
  {
    path:'/latestmovies',
    component:LatestMovies
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
